package cn.kgc.shiroday03.commons;

import lombok.Data;

/**
 * @Author: 课工场
 * @Version: v1.0  2023/6/5
 * @Description:  统一格式的响应结果
 */
@Data
public class ResponseResult {

    private Integer code;
    private String msg;
    private Long count;
    private Object data;

   // 1.  增删改   code  msg
   public ResponseResult(CodeMsg codeMsg){
        this.code = codeMsg.getCode();
        this.msg = codeMsg.getMsg();
   }

   //2.查询  code  msg  count  data

    public ResponseResult(CodeMsg codeMsg,Long count,Object data){
       this(codeMsg);
       this.count = count;
       this.data = data;
    }


}
